﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Kevin.Framework.Data.OrmMapping;
using Kevin.Framework.Data;

namespace JOIN.Rights.BLL
{
    public interface IBLL<T> where T:EntityBase
    {
        /// <summary>
        /// 单据
        /// </summary>
        T Entity { get; set; }

        /// <summary>
        /// 操作类型
        /// </summary>
        OperState OperState { get; set; }

        /// <summary>
        /// 操作的页面
        /// </summary>
        //Page Page { get; set; }

        /// <summary>
        /// 单据 - 保存（新增，修改）
        /// </summary>
        ServiceResult<T> Save();

        /// <summary>
        /// 单据 - 申报
        /// </summary>
        ServiceResult<T> Apply();

        /// <summary>
        /// 单据 - 删除
        /// </summary>
        ServiceResult<T> Delete();
        /// <summary>
        /// 单据 - 审批
        /// </summary>
        /// <param name="isPass">是否通过</param>
        /// <param name="remark">审批意见</param>
        ServiceResult<T> Check(bool isPass, string remark, string taskID);

        /// <summary>
        /// 根据操作类型执行相应的操作方法,仅限于（新增，修改，删除，申报）
        /// </summary>
        ServiceResult<T> Excute();
    }
}
